package de.keychain

import grails.rest.Resource


@Resource(uri='/configurations', formats=['json'])
class Configuration {

	String email
	String activationCode
	String encryptionSalt

	ServiceModel service

	static constraints = {

		email blank:false
		activationCode nullable:true
		encryptionSalt blank:false

		service nullable:false
	}


	def beforeValidate(){
		this.encryptionSalt = java.util.UUID.randomUUID().toString();
	}
}
